<template>
    <div>
        <p>count值：{{ Count }}</p>
        <button @click="add">加n</button>
    </div>
</template>
<script setup>
import { ref } from "vue"
const emit = defineEmits(['updateCount']);
const Count = ref(1);
const add = () => {
    Count.value++;
    emit("updateCount", 2);
}
</script>